using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

namespace LS
{
    public class CSVUtility
    {
        public const string Table = "\t";
        public const string Space = " ";
        public const string Comma = ",";
        public const string Period = ".";
        public const string Semicolon = ";";
        public const string NewLine = "\r\n";

        public static string CombinBaseText(string fileName,string separator, string[] keys, string[] types, string[] notes)
        {
            string[] _1 = new string[] { "#", fileName };
            string[] _2 = new string[] { "#" }.Concat(keys).ToArray();
            string[] _3 = new string[] { "#" }.Concat(types).ToArray();
            string[] _4 = new string[] { "#" }.Concat(notes).ToArray();

            string _1T = string.Join(separator, _1);
            string _2T = string.Join(separator, _2);
            string _3T = string.Join(separator, _3);
            string _4T = string.Join(separator, _4);
            string text = string.Join(NewLine, _1T, _2T, _3T, _4T);
            return text;
        }

        public static string CombinValueText(string separator, string baseText, params string[] values)
        {
            string[] arr = new string[] { "" }.Concat(values).ToArray();
            string valueBase = string.Join(separator, arr);
            return string.Join(NewLine, baseText, valueBase);
        }
    }
}
